<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <?php if (empty($item_id)){?>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">合同编号:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-item_id" data-rule="required" data-source="cert/loan/items/index" data-primary-key="id" data-field="address"  class="form-control selectpage" name="row[item_id]" type="text" value="">
            </div>
        </div>
    <?php }else{?>
        <input id="c-item_id" name="row[item_id]" type="hidden" value="{$item_id}">
    <?php }?>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('State')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="stateList" item="vo"}
                <label>
                <input id="c-state-{$vo.state_id}" data-rule="" name="row[state]" type="radio" value="{$vo.state_id}" {in name="vo.state_id" value="$state"}checked{/in} >{$vo->state_name}
                </label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Comment')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-comment" data-rule="required" class="form-control" name="row[comment]" type="text">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
